import http from '../utils/request.js'

/**
 * 获取场次信息
 */
export function getSceneInfo({
  splid
}) {
  const is_need_profit = 1
  return http.$post('sheZhi/findInfo', {
    splid,
    is_need_profit,
  }, null);
}

/**
 * 申请活动
 */
export function applyActivity(paramObj) {
  return http.$post('huoDongHm/add', {

    theme: paramObj.activityName,
    using_date: paramObj.activityDate,
    scenario: paramObj.activeSceneVal,
    hotel_name: paramObj.activityAddress,
    emcee_name: paramObj.emcee_name,
    isSendSystemGift: paramObj.isSendSystemGift,
    isNeedUserComment: paramObj.isNeedUserComment,
    is_help_hm: paramObj.is_help_hm,
    phone_zfb: '',
    templateId: '',
    wedding_schedule: paramObj.wedding_schedule,
    key_word: '',
    kind: '1',
    is_gift_to_hbkd: paramObj.is_gift_to_hbkd,
    hby_kd_rate_val: paramObj.hby_kd_rate_val.toString(),
    is_close_coin: paramObj.is_close_coin,
    dy_appid: paramObj.dy_appid,
    newcomer_json: paramObj.newcomer_json,
  }, null);
}
/**
 * 获取活动模板列表
 */
export function getTemplateList(paramObj) {
  return http.$post('newHuoDongHm/templateList', {
    showCount: paramObj.showCount,
    currentPage: paramObj.currentPage
  })
}

/**
 * 提现
 */
export function withDrawMoney(splid) {

  return http.$post('newHuoDongHm/moneyTiXian', {
    splid: splid,
  }, null);
}

/**
 * 提现
 */
export function editSetting({
  key,
  value,
  splid
}) {

  return http.$post('sheZhi/update', {
    [key]: value,
    splid
  }, null);
}

// 获取签到用户列表
export function getSignInList(splid) {
  return http.$post('zhongJiang/qianDaoLieBiao', {
    splid,
    currentPage: 1,
    showCount: '500',
  }, null);
}

// 加入/移除黑名单
export function moveblack({
  userId,
  splid,
  type = '0',
}) {
  return http.$post('zhongJiang/addBlackList', {
    splid,
    userId,
    type,
  }, null);
}

// 设置红包雨扣点比例
export function reqUpdateHbyKdRate({
  splid,
  hby_kd_rate_val,
}) {
  const is_need_profit = 1
  return http.$post('sheZhi/updateHbyKdRate', {
    splid,
    hby_kd_rate_val,
  }, null);
}

/**
 * 企业微信跳转过来领取红包
 */
export function reqGetHbFromQy() {
  return http.$post('common/receiveRedPacket', {}, null);
}

/**
 * 判断是否加过企业微信
 */
export function reqHasAddQyWeixin() {
  return http.$post('common/isJoinQw', {}, null);
}